package com.lys.service.impl;


import com.lys.service.DataClient;
import com.lys.service.WeatherReportService;
import com.lys.vo.Weather;
import com.lys.vo.WeatherResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IWeatherReportService implements WeatherReportService {
    @Autowired
    private DataClient dataClient;
    @Override
    public Weather getDataByCityKey(String key) {
        // 改未由天气数据API微服务提供
        WeatherResponse weatherResponse = dataClient.getDataByCityKey(key);
        return weatherResponse.getData();
    }
}
